package com.example.covid19.mapper;

import com.example.covid19.entity.Cheeck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.covid19.entity.Demander;
import com.example.covid19.entity.Locationn;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BaiZhengChun
 * @since 2023-03-12
 */
public interface CheeckMapper extends BaseMapper<Cheeck> {
    /**
     *
     * @param id
     * @return当前登陆学生的地址信息
     */
    @Select("SELECT " +
            " builder.locaonid " +
            " FROM " +
            " student " +
            " INNER JOIN " +
            " room " +
            " ON " +
            " student.rid = room.id " +
            " INNER JOIN " +
            " builder " +
            " ON " +
            " room.lid = builder.lid " +
            " WHERE " +
            " student.studentid = #{id} ")
    String getlocal(@Param("id")String id);

}
